<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="_commonAdmin/title.jsp" %>
<%
    if (null == session.getAttribute("admin")) {
        response.sendRedirect("login.jsp");
    }
%>
<body>
    <%@include  file="_commonAdmin/header.jsp" %>
    <%@include  file="_commonAdmin/sidebar.jsp" %>


    <div class="col-main col-xs-12 col-sm-6 col-md-9">
        <!-- InstanceBeginEditable name="main" -->
        <h2 class="ico_mess">MessageBroads Manager</h2>
        <table id="table">
            <thead>
                <tr>
                    <th>MessageID</th>
                    <th>Title</th>
                    <th>Content</th>
                    <th>Date</th>
                    <th>Author</th>
                    <th>Attachment</th>
                    <th>DeadLine</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <logic:iterate id="messageitem" name="MessageBroads" property="messageBroads">
                    <tr>

                        <td>${messageitem.messageId}</td>
                        <td>${messageitem.title}</td>
                        <td>${messageitem.content}</td>
                        <td>${messageitem.date}</td>
                        <td>${messageitem.author}</td>
                        <td>${messageitem.attachment}</td>
                        <td>${messageitem.deadline}</td>
                        <td><a href="../messageBroadsDelete.do?messID=${messageitem.messageId}" title="Delete MessageBroads" onclick="return confirm('Do you want to delete this Message ?')"><img src="<%=request.getContextPath()%>/_assets/imagesAdmin/cancel.jpg" alt="Delete"></a><a  href="../messageBroadsPreForEdit.do?messID=${messageitem.messageId}" title="Edit MessageBroads"><img src="<%=request.getContextPath()%>/_assets/imagesAdmin/edit.jpg" alt="Edit"></a></td>
                    </tr>
                </logic:iterate>
            </tbody>
        </table>
    </div>
    <%@include file="_commonAdmin/footer.jsp" %>
</body>
</html>


